package com.sbm.gson;

import org.springframework.http.converter.json.GsonHttpMessageConverter;

import com.google.gson.GsonBuilder;

import springfox.documentation.spring.web.json.Json;

/**
 * Null序列化、Date格式化
 *
 * @author Administrator
 *
 */
public class GsonResponseConverter extends GsonHttpMessageConverter {
	public GsonResponseConverter() {
		super.setGson(new GsonBuilder().registerTypeAdapter(Json.class, new SwaggerJsonToGsonAdapter()).serializeNulls()
				.setDateFormat("yyyy-MM-dd HH:mm:ss").create());
	}
}
